display.setStatusBar( display.HiddenStatusBar )
require("global")

local director = require("director")
local mainGroup = display.newGroup()

function loadSetting()
	return setting
end

function saveSetting()
	flag = true
	return flag
end

local function main()
  mainGroup:insert(director.directorView)
  director:changeScene("scr.mainGame.scrMainGame")
  -- director:changeScene("coup.mainGame.scrMainGame")
  return true
end

main()

--[[
local ftp = require("ftp")
 --ftp://195.222.33.239/pub/games/cod/mod/
local connection = ftp.newConnection{ 
                host = "195.222.33.239", 
                --user = "monkeyde", 
                --password = "A4MUaC8wS8", 
                port = 21 -- Optional. Will default to 21.
        }
 
local onUploadSuccess = function(event)
        print("File uploaded to " .. event.path)
end
 
local onDownloadSuccess = function(event)
        print("File downloaded to " .. event.path)
myText = display.newText("OK", 0, 0, native.systemFont, 16)
myText:setTextColor(255, 255, 255)
end
 
local onAppendSuccess = function(event)
        print("File appended")
end
 
local onError = function(event)
        print("Error: " .. event.error)
end

connection:upload{
        localFile = system.pathForFile("image.jpg", system.ResourcesDirectory),
        remoteFile =  "/public_html/imagei.jpg",
        onSuccess = onUploadSuccess,
        onError = onError
}
        
connection:download{
        remoteFile = "/pub/games/cod/mod/awe_v2.1_client.exe",
        localFile = "awe_v2.1_client.exe",
        onSuccess = onDownloadSuccess,
        onError = onError
}
     
connection:append{
        localFile = system.pathForFile("todaysLog.txt", system.ResourcesDirectory),
        remoteFile = "/public_html/completeLog.txt",
        onSuccess = onAppendSuccess,
        onError = onError
}--]]